jsx3.Class.defineClass(
    "ux.cdb.admin.customer.CustomerStage", jsx3.lang.Object, [ux.cdb.admin.AdminStage],
    function (plugin) {
        plugin.instance = null;

        plugin.getInstance = function(args) {
            if(!this.instance) {
                this.instance = new plugin();
            }
            return this.instance;
        }

        plugin.prototype.getTabText = function() {
            return 'Customer Admin';
        }

        plugin.prototype.getNamespace = function() {
            return "ux.cdb.admin";
        }   

        plugin.prototype.getComponentUIPath = function() {
            return "ux/cdb/admin/customer/ui/customer.xml";
        }

        plugin.prototype.loadComponent = function(parent) {
            ux.megatron.Main.loadUIResourceAsync(parent, this.getNamespace(), this.getComponentUIPath(), this, this.componentLoaded);
        }

        plugin.prototype.componentLoaded = function(objEvent) {
            if (objEvent.status == "SUCCESS") {
                objEvent.obj.initialize();
            }
            else {
                if (objEvent.exception) {
                    ux.megatron.Main.logException(objEvent.exception, objEvent.message);
                }
                else {
                    jsx3.log(objEvent.message);
                }
            }
        }
    });